package com.tjbank.cssys.mybatis;


import com.tjbank.cssys.mybatis.entity.IamLog;
import com.tjbank.cssys.mybatis.entity.IamLogKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamLogSqlBuilder;

import java.util.List;

public interface IamLogDao {
    /**
     * 单条插入新增记录
     *
     * @param iamLog
     * @return
     * @throws Exception
     */
    public int insert(IamLog iamLog) throws RuntimeException;




    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     *
     * @param iamLogSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamLog> selectListBySqlBuilder(IamLogSqlBuilder iamLogSqlBuilder) throws RuntimeException;


    /**
     * 批量插入新增记录
     *
     * @param listIamLogs
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamLog> listIamLogs) throws RuntimeException;


    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     *
     * @param iamLog
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamLog iamLog) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 注意：乐观锁模式下“影响记录条数”判断处理
     *
     * @param iamLog
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamLog iamLog) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     *
     * @param iamLogSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamLogSqlBuilder iamLogSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     *
     * @param iamLogKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamLogKey iamLogKey) throws RuntimeException;



}
